/**
 * 
 */
package com.youth.fund.hk.hostManager.manager.dao.mybatis;

import java.sql.Timestamp;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.youth.fund.hk.hostManager.common.dao.mybatis.BaseMybatisDao;
import com.youth.fund.hk.hostManager.manager.dao.HtmlMapperDao;
import com.youth.fund.hk.hostManager.manager.datamodel.HtmlMapperModel;

/**
 * @author Sunk_Sky
 *
 * 2014年11月28日下午2:41:44
 */
@Repository("HtmlMapperDao")
public class HtmlMapperMybatisDaoImpl extends BaseMybatisDao<HtmlMapperModel, Integer> implements HtmlMapperDao
{
	private final static String CREATE = "html_mapper.create";

	private final static String DELETE = "html_mapper.delete";

	private final static String UPDATE = "html_mapper.update";

	private final static String QUERY_BY_CONDITION = "html_mapper.list_by_condition";


	@Override
	public boolean create(HtmlMapperModel model)
	{
		Timestamp timestamp = new Timestamp(System.currentTimeMillis());

		model.setSetup_time(timestamp);

		model.setUpdate_time(timestamp);

		return super.create(model, CREATE);
	}

	
	@Override
	public boolean delete(HtmlMapperModel model)
	{
		
		return super.delete(model, DELETE);
	}

	
	@Override
	public boolean update(HtmlMapperModel model)
	{
		Timestamp timestamp = new Timestamp(System.currentTimeMillis());

		model.setUpdate_time(timestamp);
		
		return super.update(model, UPDATE);
	}

	
	@Override
	public List<HtmlMapperModel> query(HtmlMapperModel model)
	{
		
		return super.query(model, QUERY_BY_CONDITION);
	}

	
	@Override
	public HtmlMapperModel queryOne(HtmlMapperModel model)
	{
		
		return super.queryOne(model, QUERY_BY_CONDITION);
	}
	
}
